package data;

import java.util.List;
import java.util.Map;

public class WorkerFingerDao {
	public static WorkerFingerBean select(DaoSession daoSession,
			Map<String,Object> params){
		return (WorkerFingerBean)daoSession.selectOne(
				"FINGERDB_WORKERFINGER.selectByKey", params);
	}
	
	@SuppressWarnings("unchecked")
	public static List<WorkerFingerBean> selectByDeptVendor(
			DaoSession daoSession, Map<String,Object> params){
		return (List<WorkerFingerBean>)daoSession.selectList(
				"FINGERDB_WORKERFINGER.selectByDeptVendor", params);
	}
//	@SuppressWarnings("unchecked")
//	public static List<WorkerFingerBean> selectByDeptVendor(
//			DaoSession daoSession, String params){
//		List list = (List<WorkerFingerBean>)daoSession.selectList(
//				"FINGERDB_WORKERFINGER.selectByDeptVendor", params);
//		System.out.println(list);
//		return list;
//	}

	public static void insert(DaoSession daoSession, WorkerFingerBean finger){
		daoSession.insert("FINGERDB_WORKERFINGER.insert", finger);
	}
	
	public static int update(DaoSession daoSession, WorkerFingerBean finger){
		return daoSession.update("FINGERDB_WORKERFINGER.update", finger);		
	}
	
	public static int delete(DaoSession daoSession, String identifyno){
		return daoSession.delete("FINGERDB_WORKERFINGER.delete", identifyno);
	}	

	public static int clearByIdentifyno(DaoSession daoSession, Map<String,Object> params){
		return daoSession.update("FINGERDB_WORKERFINGER.clearByIdentifyno", params);
	}
}
